﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Busca</title>

    <!-- WinJS references -->
    <link href="//Microsoft.WinJS.1.0/css/ui-light.css" rel="stylesheet" />
    <script src="//Microsoft.WinJS.1.0/js/base.js"></script>
    <script src="//Microsoft.WinJS.1.0/js/ui.js"></script>

    <link href="/css/default.css" rel="stylesheet" />
    <link href="searchResult.css" rel="stylesheet" />
    <script src="/js/data.js"></script>
    <script src="searchResult.js"></script>
</head>
<body>
    <!-- Item Template -->
    <div id="imageTextListTemplate" 
         data-win-control="WinJS.Binding.Template">
        <div class="imageTextList">
            <div class="imageTextListImage">
                <div data-win-control="WinJS.UI.ViewBox">
                    <img data-win-bind="alt: Name; src: IconURL" onerror="this.src='../../images/no-pic.png'" />
                </div>
            </div>
            <div class="imageTextListTextArea">
                <h2 class="imageTextListTextName win-type-ellipsis" 
                    data-win-bind="innerText: Name">
                </h2>
                <div class="win-small" 
                     data-win-control="WinJS.UI.Rating" 
                     data-win-bind="winControl.averageRating: Rate WinJS.Binding.oneTime" 
                     data-win-options="{ disabled: true }">
                </div>
                <h6 class="imageTextListTextLicense" 
                    data-win-bind="innerText: Paid">
                </h6>
                <h5 class="imageTextListTextDescription" 
                    data-win-bind="innerText: ShortDescription">
                </h5>
            </div>
        </div>
    </div>

    <div class="searchResult fragment">
        <header aria-label="Header content" role="banner">
            <button class="win-backbutton" aria-label="Back" disabled type="button"></button>
            <h1 class="titlearea win-type-ellipsis">
                <span class="pagetitle">Busca</span>
            </h1>
        </header>
        <section aria-label="Main content" role="main">

            <footer>
                <button type="button" id="btnMore">Mais Resultados</button>
            </footer>

            <!-- List -->
            <div id="imageTextList" 
                 data-win-control="WinJS.UI.ListView" 
                 data-win-options="{ layout: { type: WinJS.UI.GridLayout }, 
                                     itemTemplate: select('#imageTextListTemplate'), 
                                     selectionMode: 'none',
                                     automaticallyLoadPages: true,
                                     loadingBehavior: 'incremental', pagesToLoadThreshold: 1000, pagesToLoad: 1000 }">
            </div>

        </section>
    </div>
</body>
</html>
